package cn.njxzc.examples;

import java.util.*;
public class Exam8_5_1 {
	public static void main(String[] args) {
		@SuppressWarnings("rawtypes")
		ArrayList list=new ArrayList();
		list.add("wall");
		list.add("parent");
		list.add("mother");
		list.add("rain");
		Object[] ol=list.toArray();
		System.out.println("array of object has length"+ol.length);
		String[] sl=(String[])list.toArray(new String[0]);
		System.out.println("array of object has length"+ol.length);
		for(int i=0;i<sl.length;i++)
			System.out.println(sl[i]);
	}
}
